//导入二次封装的axios
import request from '@/utils/request'

//获取查询商品数据
export const getSearchList = (obj) => {
  const { categoryId, goodsName, page } = obj
  console.log(obj);
  return request.get('/goods/list', {
    params: {
      categoryId, goodsName, page
    }
  })
}

//根据商品id获取详细数据
export const getProDetail = (goodsId) => {
  return request.get('/goods/detail', {
    params: {
      goodsId
    }
  })
}
//获取商品评价
export const getProComments = (goodsId, limit) => {
  return request.get('/comment/listRows', {
    params: {
      goodsId, limit
    }
  })
}